<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <style>
    body,
    html {
      height: 100%;
    }

    body {
      display: flex;
      flex-direction: column;
    }

    header {
      background: beige;
    }

    section {
      background: pink;
      flex: 1;
    }

    footer {
      background: lightgreen;
    }
  </style>
</head>

<body>
  <header>虎头</header>
  <section>猪肚</section>
  <footer>豹尾</footer>
</body>

</html>